
# vi: tabstop=4 : expandtab

def raceMaker(person):
    "Sets stats based on race of Person"
    try:
        if "player" in person.attrs:
            person.stats.update(starterStats[person.race])
        elif "mob" in person.attrs:
            person.stats.update(mobRaces[person.race])
    except KeyError:
        person.stats.update(starterStats["Human"])

mobRaces = {
    "kobold": { "str": 7, "dex": 7, "int": 7, "con": 7, },
    "werewolf":{ "str": 13, "dex": 9, "int": 5, "con": 10, },
    "vampire":{ "str": 10, "dex": 15, "int": 10, "con": 9, },
    "rat":{ "str": 5, "dex": 6, "int": 2, "con": 5, },
    "bat":{ "str": 5, "dex": 5, "int": 2, "con": 5, },
    "orc":{ "str": 11, "dex": 9, "int": 7, "con": 12, },
    "goblin":{ "str": 8, "dex": 13, "int": 7, "con": 9, },
    "spider":{ "str": 8, "dex": 11, "int": 6, "con": 6, },
    "test":{ "str": 8, "dex": 11, "int": 6, "con": 6, },

    
}

starterStats = {
    "Human": {
        "str": 9,
        "dex": 9,
        "int": 9,
        "con": 9,
    },
    "Elf": {
        "str": 8,
        "dex": 10,
        "int": 10,
        "con": 8,
    },
    "Dwarf": {
        "str": 10,
        "dex": 8,
        "int": 8,
        "con": 10,
    },
    "Turan": {
        "str": 10,
        "dex": 10,
        "int": 7,
        "con": 9,
    },
    "Halfling": {
        "str": 7,
        "dex": 11,
        "int": 9,
        "con": 9,
    },
    "Half-Ogre": {
        "str": 12,
        "dex": 7,
        "int": 6,
        "con": 11,
    },
    "Gnome":{
        "str":6,
        "dex":11,
        "int":12,
        "con":7,
    },
}

possibleRaces = starterStats.keys()
